﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Capricornus
{
    public class Common
    {
        public static string GetConstr()
        {
            string constr = ConfigurationManager.ConnectionStrings["conStr"].ConnectionString;

            return constr;
        }

        /// <summary>
        /// 返回45位长度的ID
        /// </summary>
        /// <returns></returns>
        public static string GetId()
        {
            string id = (DateTime.Now.ToString("yyyyMMddHHmiss") + Guid.NewGuid().ToString("n").ToUpper()).Substring(0,
                45);

            return id;
        }

        public static string GetConType()
        {
            string conType = ConfigurationManager.AppSettings["dbType"];

            return conType;
        }
    }
}
